<template>
  <div class="base_pagination">
    <el-pagination
      :current-page="current"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      :small="small"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  props: {
    current: {
      type: Number,
      require: true
    },
    size: {
      type: Number,
      require: true
    },
    total: {
      type: Number,
      require: true
    },
    small: {
      type: Boolean,
      default: false
    }
  },
  created() {},
  methods: {
    handleSizeChange(val) {
      this.$emit("handleSizeChange", val)
    },
    handleCurrentChange(val) {
      this.$emit("handleCurrentChange", val)
    }
  }
}
</script>
<style lang="scss" scoped>
.base_pagination {
  height: 60px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
}
</style>
